package com.ys.service.business;

import java.util.List;
import java.util.Map;

import com.ys.entity.base.TbFileInfo;
import com.ys.entity.base.TbFileInfoBatchDownload;
import com.ys.vo.R;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface TbFileInfoService {
	
	R add(TbFileInfo entity) throws Exception;

	R edit(Map<String, Object> params) throws Exception;

	R deleteFalse(Long id);

	/**
	 * 批量下载文件(生成zip文件下载)(注意，一次请求只能调用一次，无法调用多次)
	 *
	 * @param list     要下载的批量文件集合
	 * @param request  request
	 * @param response response
	 * @param zipFileName    压缩包文件名字
	 */
	void downLoadFileBatch(List<TbFileInfo> list, HttpServletRequest request, HttpServletResponse response, String zipFileName)throws Exception;


	/**
	 * 批量下载文件(生成zip文件下载)，并进行文件夹划分（只划分一个文件夹层级，生成路径示例：zipFileName/folderName/文件）(注意，一次请求只能调用一次，无法调用多次)
	 *
	 * @param list     要下载的批量文件集合（划分好之后的）
	 * @param request  request
	 * @param response response
	 * @param zipFileName    压缩包文件名字
	 */
	void downLoadFileBatchWithFolder(List<TbFileInfoBatchDownload> list, HttpServletRequest request, HttpServletResponse response, String zipFileName)throws Exception;



}